<?php

$code = new \Imagick( '/Volumes/kuozhan/zhengjian.jpg' );
$code->setimageformat('png');
$code->transparentPaintImage(new \ImagickPixel('rgb(0,191,242)'), 0, '20000', 0);
$code->despeckleImage();
// header("Content-Type: image/{$image->getImageFormat()}");
// die;
$code->writeImage('/Volumes/kuozhan/zhengjian2.png');
// echo $code->getImageBlob( );
